import VueRouter from 'vue-router';
import home from './component/tabbar/home.vue';
import member from './component/tabbar/member.vue';
import shopcar from './component/tabbar/shopcar.vue';
import search from './component/tabbar/search.vue';
import newList from './component/news/newList.vue';
import newsInfo from './component/news/newsIfon.vue';
import photosList from './component/photos/photoList.vue';
import photosIfon from './component/photos/photosIfon.vue';
import goodsList from './component/shop/goodsList.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:home},
    {path:'/member',component:member},
    {path:'/shopcar',component:shopcar},
    {path:'/search',component:search},
    {path:'/home/newList',component:newList},
    {path:'/home/newsIfon/:id',component:newsInfo},
    {path:'/home/photoList',component:photosList},
    {path:'/home/photosIfon/:id',component:photosIfon},
    {path:'/home/goodsList',component:goodsList}
  ],
  linkActiveClass:'mui-active',
})

// 把路由对象暴露出去
export default router